// 后端服务接口地址
export const BACKEND_URL = 'https://api.shuimof.cn' // 云端 aliyun
// export const BACKEND_URL = 'http://192.168.1.253:80' // 本地
// export const BACKEND_URL = 'http://47.96.11.208:80' // 云端
// export const BACKEND_URL = "http://10.0.1.126:80";

// 业务员状态
export const EMPLOYEE_STATUS = {
  APPLYING: { val: 'APPLYING', name: '申请中' }, // 申请
  DONE: { val: 'DONE', name: '已审核' }, // 已审核
  REJECT: { val: 'REFUSE', name: '已拒绝' } // 已拒绝
}
// 价格类型
export const PRICE_TYPE = {
  FLOAT: { val: 'FLOAT', desc: '浮动价格' }, // 浮动型
  FIXED: { val: 'FIXED', desc: '固定价格' } // 固定型
}

// 订单状态
export const ORDER_STATUS = {
  QUOTATION: { val: 'QUOTATION', name: '待报价' }, // 待报价 --- > 去报价
  DISCARD: { val: 'DISCARD', name: '已废除' }, // 废除
  NOTPAY: { val: 'NOTPAY', name: '未支付' }, // 未支付
  NOTDISTRIBUTE: { val: 'NOTDISTRIBUTE', name: '待分配' }, // 待分配
  SERVING: { val: 'SERVING', name: '服务中' }, // 服务中
  DONE: { val: 'DONE', name: '已完成' }, // 已完成
  ALL: { val: 'ALL', name: '全部' } // 全部
}
// 订单报价期间的状态
export const QUOTATIONS_STATUS = {
  INPROGRESS: { val: 'INPROGRESS', name: '报价中' },
  DONE: { val: 'DONE', name: '报价完成' },
  ALL: { val: 'ALL', name: '全部' }
}
// 支付阶段状态:
// ALL 已经付-'PAYED',未支付-'NOTPAY'
export const PAYMENT_STATUS = {
  PAYED: { val: 'PAYED', name: '已支付' },
  NOTPAY: { val: 'NOTPAY', name: '未支付' },
  ALL: { val: 'ALL', name: '全部' }
}
// 分配阶段状态:
// ALL 已分配-'DISTRIBUTED',未分配-'NOTDISTRIBUTE'
export const DISTRIBUTE_STATUS = {
  DISTRIBUTED: { val: 'DISTRIBUTED', name: '已分配' },
  NOTDISTRIBUTE: { val: 'NOTDISTRIBUTE', name: '未分配' },
  ALL: { val: 'ALL', name: '全部' }
}
//  服务追踪阶段:
//  ALL 服务中-'SERVING', 已完成-'DONE'
export const SERVING_STATUS = {
  SERVING: { val: 'SERVING', name: '服务中' },
  DONE: { val: 'DONE', name: '已完成' },
  ALL: { val: 'ALL', name: '全部' }
}
//  校验阶段状态:
//  ALL 已完成-'DONE',校验中-'PENDING'
export const CHECK_STATUS = {
  PENDING: { val: 'PENDING', name: '校验中' },
  DONE: { val: 'DONE', name: '已完成' },
  ALL: { val: 'ALL', name: '全部' }
}

// 订单校验状态
export const ORDER_CHECK_STATUS = {
  PENDING: { val: 'PENDING', name: '待校验' },
  DONE: { val: 'DONE', name: '校验通过' },
  REFUSE: { val: 'REFUSE', name: '校验不过' }
}
// 产品上线或下线的状态
export const PRODUCT_SALE_STATUS = {
  ONLINE: 'ONLINE', // 已上架
  OFFLINE: 'OFFLINE' // 已下架
}
// 积分兑换申请状态
export const CREDIT_STATUS = {
  APPLYING: { val: 'PENDING', name: '申请中' },
  REFUSE: { val: 'REFUSE', name: '已拒绝' },
  DONE: { val: 'DONE', name: '已处理' }
}
// 用户类型
export const USER_TYPE = {
  EMPLOYEE: { val: 'EMPLOYEE', name: '业务员' },
  CUSTOMER: { val: 'CUSTOMER', name: '客户' }
}

// 兑换类型
export const EXCHANGE_TYPE = {
  MONEY: { val: 'MONEY', name: '兑现' }
}

// 服务任务状态
export const ORDER_TASK_STATUS = [
  { val: 'NOTSET', name: '待办' },
  { val: 'DOING', name: '办理中' },
  { val: 'DONE', name: '已完成' }
]

// 默认审核备注
export const DEFAULT_AUDIT_PASS_REMARK = '同意申请'
export const DEFAULT_AUDIT_REFUSE_REMARK = '拒绝申请'
// 管理员默认密码
export const DEFAULT_ADMIN_PASSWORD = '123456'

export const USE_MOCK = false
export const SUCCESS_CODE = 200
// 数据获取失败提示
export const FETCH_ADMIN_LIST_FAILED = '获取管理员列表失败！'
export const FETCH_ADMIN_PERFORMANCE_FAILED = '获取管理员绩效失败！'
export const FETCH_CREDIT_APPLY_LIST_FAILED = '获取积分申请列表失败！'
export const FETCH_PRODUCT_LIST_FAILED = '获取产品列表失败！'
export const FETCH_ORDER_LIST_FAILED = '获取订单列表失败！'
export const FETCH_PROMOTION_LIST_FAILED = '获取推广信息失败！'
// admin manage
export const RESET_PASSWORD_SUCCESS = `操作成功，密码已成功重置为${DEFAULT_ADMIN_PASSWORD}`

// 通用消息
export const OP_SUCCESS = '操作成功！'
export const OP_FAIL = '操作失败...'

/** ********权限路由 Map******************* */
// 0: { permissionId: 1, permissionName: "ALL", permissionCode: "*:*", menuCode: "ALL", menuName: "全部权限", … }
// 1: { permissionId: 2, permissionName: "管理员设置权限", permissionCode: "admin_setting:*", … }
// 2: { permissionId: 3, permissionName: "业务员申请权限", permissionCode: "emp_apply:*", menuCode: "emp_apply", … }
// 3: { permissionId: 4, permissionName: "业务员管理权限", permissionCode: "emp_manage:*", menuCode: "emp_manage", … }
// 4: { permissionId: 5, permissionName: "产品管理权限", permissionCode: "prod_manage:*", menuCode: "prod_manage", … }
// 5: { permissionId: 6, permissionName: "订单管理权限", permissionCode: "order_manage:*", menuCode: "order_manage", … }
// 6: { permissionId: 7, permissionName: "推广管理权限", permissionCode: "promo_manage:*", menuCode: "promo_manage", … }
// 7: { permissionId: 8, permissionName: "积分兑换权限", permissionCode: "credit_exchange:*", … }
// 8: { permissionId: 9, permissionName: "客户管理权限", permissionCode: "customer_manage:*", … }
// 9: { permissionId: 10, permissionName: "订单分配权限", permissionCode: "order_assign:*", … }
export const PERMISSION_ROUTE_MAP = {
  '1': '/admin_manage', // 全部权限
  '2': '/admin_manage', // 管理员管理权限
  '3': '/employee_apply', // 管理员申请权限
  '4': '/employee_manage', // 业务员管理权限
  '5': '/product_manage', // 产品管理权限
  '6': '/order_manage', // 订单管理权限
  '7': '/promotion-manage', // 推广管理权限
  '8': '/credit-manage', // 积分兑换权限
  '9': '/customer-manage', // 客户管理权限
  '10':'/order_check', // 订单检验权限
  '11':'/enterprise-manage' //企业信息管理
}
